#pragma once
#ifndef __COMPONENT_H__
#define __COMPONENT_H__

#include "Utility.h"

#include "../util/D3DCommon.h"
#include "../util/PreDeclare.h"

namespace WindGE
{
	enum EComponentType
	{
		ect_component,
		ect_collider,
		ect_renderer,
		ect_animation,
		ect_script,
		
		ect_count
	};

	class WIND_CORE_API Component : public std::enable_shared_from_this<Component>
	{
	public:
		Component();
		Component(GameObjectPtr gameObject);
		virtual ~Component();

		inline void set_gameobject(GameObjectPtr go)	{ gameobject_ = go;		}
		inline GameObjectPtr gameobject() const			{ return gameobject_;	}

		inline virtual EComponentType type() const		{ return ect_component;	}

	protected:
		GameObjectPtr gameobject_;
	};

}//end namespace WindGE


#endif // !__COMPONENT_H__


